package cn.wolfcode.trip.app.web.controller;

import cn.wolfcode.trip.base.domain.ContinuitySign;
import cn.wolfcode.trip.base.service.IContinuitySignService;
import cn.wolfcode.trip.base.util.JSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/continuitysign")
public class ContinuitySignController {

    @Autowired
    private IContinuitySignService continuitySignService;


    @GetMapping
    public Object SelectState(int day){

        return continuitySignService.selectStateByDay(day);
    }


    @PostMapping
    public Object updateState(ContinuitySign entity){
        continuitySignService.update(entity);
        return new JSONResult();
    }

}
